Use new history var for keymap selection
authorjustbur <justin@burkett.cc>
Tue, 19 Apr 2016 12:14:34 +0000 (08:14 -0400)
committerjustbur <justin@burkett.cc>
Tue, 19 Apr 2016 12:14:34 +0000 (08:14 -0400)
which-key.el

index 54839807a0b05d506e47b0de715636b159cc7360..6939132cfa9e1b3ccdd99eba06bdaf27d2519c17 100644 (file)
@@ -48,8 +48,6 @@
 (defvar golden-ratio-mode)
 (declare-function evil-get-command-property "ext:evil-common.el")
 
-(defvar variable-name-history nil)
-
 (defgroup which-key nil
   "Customization options for which-key-mode"
   :group 'help
@@ -438,6 +436,10 @@ to a non-nil value for the execution of a command. Like this
 \(let \(\(which-key-inhibit t\)\)
 ...\)")
 
+(defvar which-key-keymap-history nil
+  "History of keymap selections in functions like
+`which-key-show-keymap'.")
+
 ;; Internal Vars
 (defvar which-key--buffer nil
   "Internal: Holds reference to which-key buffer.")
@@ -1923,7 +1925,7 @@ is selected interactively from all available keymaps."
                         (and (boundp m)
                              (keymapp (symbol-value m))
                              (not (equal (symbol-value m) (make-sparse-keymap)))))
-                      t nil 'variable-name-history))))
+                      t nil 'which-key-keymap-history))))
     (which-key--show-keymap (symbol-name keymap-sym) (symbol-value keymap-sym))))
 
 (defun which-key-show-minor-mode-keymap ()
@@ -1940,7 +1942,7 @@ is selected interactively by mode in `minor-mode-map-alist'."
                       (and (symbol-value (car entry))
                            (not (equal (cdr entry) (make-sparse-keymap)))))
                     minor-mode-map-alist))
-           nil t nil 'variable-name-history))))
+           nil t nil 'which-key-keymap-history))))
     (which-key--show-keymap (symbol-name mode-sym)
                             (cdr (assq mode-sym minor-mode-map-alist)))))